package com.t5.web.controllers;

import com.t5.bo.Account;
import com.t5.services.TestService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.view.RedirectView;

import java.util.List;

@Controller
@RequestMapping("/test")
public class TestController {

  @Autowired
  private TestService testService;

  @RequestMapping("/do")
  public RedirectView test() throws Exception {
    List<Account> allAccount = testService.getAllAccount();
    System.out.println("XXX: "+allAccount.size());
    return new RedirectView();
  }
}
